package ${packagePath}.service;

import cn.easybuild.core.jpa.BaseJpaService;
import cn.easybuild.pojo.DataSet;
import net.sinedu.company.bases.DataSetAdapter;
import ${packagePath}.${className};
import ${packagePath}.${className}QueryParam;
import ${packagePath}.repository.${className}Repository;
import org.springframework.transaction.annotation.Transactional;

import javax.inject.Inject;
import javax.inject.Named;

/**
 * Created by ${author} on ${datetime}.
 */
@Named
@Transactional
public class ${className}ServiceImpl extends BaseJpaService<${className}, String> implements ${className}Service {

  @Inject
	private ${className}Repository repository;

  @Override
  public DataSet<${className}> query${className}ByParam(${className}QueryParam queryParam) {
    return new DataSetAdapter<>(repository.findAll(queryParam.toPageParam()));
  }
}
